projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b96e835
)
picture: Use new snapshot transforms
author
Benjamin Otte
<otte@redhat.com>
Thu, 21 Feb 2019 04:34:12 +0000
(
05:34
+0100)
committer
Benjamin Otte
<otte@redhat.com>
Thu, 21 Feb 2019 18:47:28 +0000
(19:47 +0100)
gtk/gtkpicture.c
patch
|
blob
|
history
diff --git
a/gtk/gtkpicture.c
b/gtk/gtkpicture.c
index 1ae495c35d752d70dc4bdd3d042c61a65cd16168..3dc7c9b91be765d30a75d7140a27d16a4fbab0f4 100644
(file)
--- a/
gtk/gtkpicture.c
+++ b/
gtk/gtkpicture.c
@@
-133,9
+133,10
@@
gtk_picture_snapshot (GtkWidget *widget,
x = (width - ceil (w)) / 2;
y = floor(height - ceil (h)) / 2;
- gtk_snapshot_offset (snapshot, x, y);
+ gtk_snapshot_save (snapshot);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x, y));
gdk_paintable_snapshot (self->paintable, snapshot, w, h);
- gtk_snapshot_
offset (snapshot, -x, -y
);
+ gtk_snapshot_
restore (snapshot
);
}
}